package cn.itsource.org.domain;


import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.domain.CreatePassword;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "t_employee")
@ApiModel(value = "员工实体类")
public class Employee extends BaseDomain implements CreatePassword {

    //用户名
    private String username;
    //邮箱
    private String email;
    //手机号
    private String phone;
    //手机号
    private String salt;
    //密码
    @NotBlank(message = "密码不能为空")
    @Size(min=3,max = 16,message = "密码控制在3-16位")
    private String password;
    //确认密码
    @Transient
    @NotBlank(message = "密码不能为空")
    @Size(min=3,max = 16,message = "密码控制在3-16位")
    private String comfirmPassword;
    //年龄
    private Integer age;
    //状态
    private Integer state;
    //部门id
    private Long departmentId;
    //登录id
    private Long logininfoId;
    //店铺id
    private Long shopId;
    //父id
    private Long parentId;
    //经理id
    private Long managerId;
    //头像
    private String headImg;

}
